{ KOL MCK } // Do not remove this line!
const _pageInfo = 0;
const _pageLicense = 1;
const _pageHelp = 2;
const _pagesMain_Presets = 0;
const _pagesMain_Options = 1;
const _pageAbout = 2;
const pmiApply = 0;
const pmiEdit = 1;
const pmiCreate = 2;
const N1 = 3;
const mpiPrePostActions = 4;
const N2 = 5;
const pmiOpenText = 6;
const pmiOpenDirectory = 7;


procedure NewMainForm( var Result: PMainForm; AParent: PControl );
begin

  {$IFDEF KOLCLASSES}
  Result := PMainForm.Create;
  {$ELSE OBJECTS}
  New( Result, Create );
  {$ENDIF KOL CLASSES/OBJECTS}
  Result.Form := NewForm( AParent, 'MainForm' ).SetPosition( 1265, 10 );
  Result.Form.Add2AutoFree( Result );
      Result.klfrmMainBeforeCreateWindow( Result );
     Result.Form.SetUnicode(TRUE);
    Result.Form.SetClientSize( 580, 927 );
    Result.Form.Font.Color := TColor(clBlack);
    Result.Form.Font.FontHeight := -11;
    Result.Form.Font.FontName := 'Microsoft Sans Serif';
    Result.Form.Font.FontCharset := 204;
    Result.Form.Border := 0;
    Result.Form.MarginTop := 1;
    Result.Form.MarginLeft := 2;
    Result.Form.MinWidth := 580;
    Result.Form.MinHeight := 480;
    Result.Form.KeyPreview := TRUE;
      Result.Form.OnClose := Result.klfrmMainClose;
      Result.Form.OnKeyChar := Result.klfrmMainKeyChar;
    NewMenu( Result.Form, 0, [ '' ], nil );

    Result.pmPresets := NewMenu( Result.Form, 0, [ '!Apply'
      , '!Edit', '!Create new...', '-', 'Pre/PostActions...'
      , '-', '!Open file...', '!Open folder...', '' ], nil );
    Result.pmPresets.AssignEvents( 0, [ Result.pmPresetspmiApplyMenu ] );
    Result.pmPresets.ItemEnabled[ 1 ] := False;
    Result.pmPresets.ItemVisible[ 1 ] := False;
    Result.pmPresets.ItemVisible[ 2 ] := False;
    Result.pmPresets.AssignEvents( 4, [ Result.pmPresetsmpiPrePostActionsMenu ] );
    Result.pmPresets.AssignEvents( 6, [ Result.pmPresetspmiOpenTextMenu ] );
    Result.pmPresets.AssignEvents( 7, [ Result.pmPresetspmiOpenDirectoryMenu ] );
      Result.pmPresets.OnPopup := Result.pmPresetsPopup;

    Result.dlgFile := NewOpenSaveDialog( '', '', [ OSFileMustExist, OSOverwritePrompt, OSPathMustExist, OSReadonly ] );
  Result.Form.Add2AutoFree( Result.dlgFile );

    Result.dlgDirectory := NewOpenDirDialog( '', [ odStatusText ] );
  Result.Form.Add2AutoFree( Result.dlgDirectory );

    InitCommonControls;
    {$R MainForm_MHXP.RES}
    Result.pagesEdit := NewTabControl( Result.Form, [ '!Information', '!EULA', '!Help' ], [ tcoHotTrack ], nil, 0 ).SetAlign ( caClient ).SetBorder( 3);
   Result.pagesEdit.SetUnicode(TRUE);
    Result.pagesEdit.TabStop := FALSE;
      Result.pagesEdit.Pages[ 0 ].Transparent := True;
    Result.pagesEdit.Pages[ 0 ].Color := TColor(clBtnFace);
        Result.canvasInfoPreview := NewPaintBox( Result.pagesEdit.Pages[ 0 ] ).SetAlign ( caClient ).SetBorder( 0);
   Result.canvasInfoPreview.SetUnicode(TRUE);
        Result.canvasInfoPreview.Ctl3D := False;
        Result.canvasInfoPreview.DoubleBuffered := True;
    Result.canvasInfoPreview.Color := TColor(clBtnFace);
        Result.pInfo := NewPanel( Result.pagesEdit.Pages[ 0 ], esNone ).SetAlign ( caBottom ).SetSize( 0, 102 ).SetBorder( 0);
   Result.pInfo.SetUnicode(TRUE);
        Result.pInfo.Transparent := True;
          Result.lInfoDesc := NewLabel( Result.pInfo, '' ).SetAlign ( caClient ).MakeWordWrap.SetBorder( 2);
   Result.lInfoDesc.SetUnicode(TRUE);
          Result.lInfoDesc.Transparent := True;
          Result.pInfoAuthor := NewPanel( Result.pInfo, esNone ).SetAlign ( caTop ).SetSize( 0, 24 ).SetBorder( 0);
   Result.pInfoAuthor.SetUnicode(TRUE);
          Result.pInfoAuthor.MarginTop := 6;
          Result.pInfoAuthor.Visible := False;
          Result.pInfoAuthor.Transparent := True;
            Result.lAuthor := NewLabel( Result.pInfoAuthor, '' ).SetAlign ( caClient ).SetBorder( 2);
   Result.lAuthor.SetUnicode(TRUE);
    Result.lAuthor.Font.FontName := 'Tahoma';
            Result.lAuthor.Transparent := True;
            Result.lInfoAuthor := NewLabel( Result.pInfoAuthor, '!Author: ' ).SetAlign ( caLeft ).AutoSize( TRUE ).SetBorder( 2);
   Result.lInfoAuthor.SetUnicode(TRUE);
    Result.lInfoAuthor.Font.FontName := 'Tahoma';
            Result.lInfoAuthor.Transparent := True;
        Result.pLicense := NewPanel( Result.pagesEdit.Pages[ 1 ], esLowered ).SetAlign ( caClient );
   Result.pLicense.SetUnicode(TRUE);
          Result.reLicense := NewRichEdit( Result.pLicense, [ eoMultiline, eoNoHScroll, eoReadonly ] ).SetAlign ( caClient );
   Result.reLicense.SetUnicode(TRUE);
          Result.reLicense.HasBorder := FALSE;
        Result.pHelp := NewPanel( Result.pagesEdit.Pages[ 2 ], esLowered ).SetAlign ( caClient );
   Result.pHelp.SetUnicode(TRUE);
          Result.reHelp := NewRichEdit( Result.pHelp, [ eoMultiline, eoNoHScroll, eoReadonly ] ).SetAlign ( caClient );
   Result.reHelp.SetUnicode(TRUE);
          Result.reHelp.HasBorder := FALSE;
    Result.pagesMain := NewTabControl( Result.Form, [ '!Presets', '!Options', '!About' ], [ tcoHotTrack ], nil, 0 ).SetAlign ( caLeft ).SetSize( 260, 0 ).SetBorder( 3);
   Result.pagesMain.SetUnicode(TRUE);
    Result.pagesMain.TabStop := FALSE;
    Result.pagesMain.DoubleBuffered := True;
      Result.pagesMain.Pages[ 0 ].EraseBackground := TRUE;
    Result.pagesMain.Pages[ 0 ].Color := TColor(clBtnFace);
        Result.Panel1 := NewPanel( Result.pagesMain.Pages[ 0 ], esLowered ).SetAlign ( caClient );
   Result.Panel1.SetUnicode(TRUE);
          Result.tvPresets := NewTreeView( Result.Panel1, [ tvoFullRowSelect, tvoNonEvenHeight ], nil, nil ).SetAlign ( caClient );
   Result.tvPresets.SetUnicode(TRUE);
          Result.tvPresets.HasBorder := FALSE;
          Result.tvPresets.DoubleBuffered := True;
    Result.tvPresets.Color := TColor(clWindow);
          Result.tvPresets.TVRightClickSelect := TRUE;
        Result.pPresetsTools := NewPanel( Result.pagesMain.Pages[ 0 ], esLowered ).SetAlign ( caBottom ).SetSize( 0, 37 ).SetBorder( 0);
   Result.pPresetsTools.SetUnicode(TRUE);
        Result.pPresetsTools.MarginTop := 2;
        Result.pPresetsTools.MarginBottom := 1;
        Result.pPresetsTools.MarginLeft := 2;
        Result.pPresetsTools.MarginRight := 3;
        Result.pPresetsTools.DoubleBuffered := True;
        Result.pPresetsTools.EraseBackground := TRUE;
    Result.pPresetsTools.Color := TColor(clBtnFace);
          Result.bApply := NewButton( Result.pPresetsTools, '!Apply' ).SetAlign ( caLeft ).SetSize( 138, 0 ).SetBorder( 2);
   Result.bApply.SetUnicode(TRUE);
          Result.bApply.Enabled := False;
          Result.bReread := NewButton( Result.pPresetsTools, '!Reread' ).SetAlign ( caRight ).SetSize( 80, 0 ).SetBorder( 2);
   Result.bReread.SetUnicode(TRUE);
    Result.pagesMain.Pages[ 1 ].Color := TColor(clBtnFace);
        Result.Panel3 := NewPanel( Result.pagesMain.Pages[ 1 ], esLowered ).SetAlign ( caClient );
   Result.Panel3.SetUnicode(TRUE);
          Result.scrollOptions := NewScrollBoxEx( Result.Panel3, esNone ).SetAlign ( caClient ).SetBorder( 4);
   Result.scrollOptions.SetUnicode(TRUE);
            Result.groupLanguage := NewGroupBox( Result.scrollOptions, '!Localization' ).SetAlign ( caTop ).SetSize( 0, 149 ).SetBorder( 0);
   Result.groupLanguage.SetUnicode(TRUE);
    Result.groupLanguage.TabStop := FALSE;
            Result.groupLanguage.MarginTop := 18;
            Result.groupLanguage.MarginBottom := 0;
            Result.groupLanguage.MarginLeft := 8;
            Result.groupLanguage.MarginRight := 8;
              Result.pLanguagesDirectoryOpt := NewPanel( Result.groupLanguage, esNone ).SetAlign ( caTop ).SetSize( 0, 127 ).SetBorder( 0);
   Result.pLanguagesDirectoryOpt.SetUnicode(TRUE);
              Result.pLanguagesDirectoryOpt.MarginTop := 2;
              Result.pLanguagesDirectoryOpt.MarginBottom := 2;
                Result.optLanguage := NewComboBox( Result.pLanguagesDirectoryOpt, [ coReadOnly, coNoIntegralHeight, coSort ] ).SetAlign ( caTop ).SetBorder( 2);
   Result.optLanguage.SetUnicode(TRUE);
                Result.optLanguage.Tag := 9;
    Result.optLanguage.Color := TColor(clWindow);
                Result.optLanguage.Items[ 0 ] := '(not set) [English]';
                Result.optLanguage.CurIndex := 0;
                Result.pLanguage1 := NewPanel( Result.pLanguagesDirectoryOpt, esNone ).SetAlign ( caTop ).SetSize( 0, 21 ).SetBorder( 0);
   Result.pLanguage1.SetUnicode(TRUE);
                  Result.optLanguageName := NewEditBox( Result.pLanguage1, [ eoReadonly ] ).SetAlign ( caClient ).SetBorder( 2);
                  Result.optLanguageName.Text := '!Localization Disabled';
                  Result.optLanguageLCID := NewEditBox( Result.pLanguage1, [ eoReadonly ] ).SetAlign ( caRight ).SetSize( 40, 0 ).SetBorder( 2);
    Result.optLanguageLCID.TextAlign := KOL.taCenter;
                Result.pLanguage2 := NewPanel( Result.pLanguagesDirectoryOpt, esNone ).SetAlign ( caTop ).SetSize( 0, 21 ).SetBorder( 0);
   Result.pLanguage2.SetUnicode(TRUE);
                  Result.optLanguageAuthor := NewEditBox( Result.pLanguage2, [ eoReadonly ] ).SetAlign ( caClient ).SetBorder( 2);
                  Result.optLanguageModified := NewEditBox( Result.pLanguage2, [ eoReadonly ] ).SetAlign ( caRight ).SetSize( 65, 0 ).SetBorder( 2);
    Result.optLanguageModified.TextAlign := KOL.taCenter;
                Result.lLanguagesDirectory := NewLabel( Result.pLanguagesDirectoryOpt, '!Languages folder:' ).SetAlign ( caTop ).SetSize( 0, 17 ).SetBorder( 2);
   Result.lLanguagesDirectory.SetUnicode(TRUE);
                Result.lLanguagesDirectory.Tag := 10;
    Result.lLanguagesDirectory.VerticalAlign := KOL.vaCenter;
                Result.pLanguagesDirectory := NewPanel( Result.pLanguagesDirectoryOpt, esNone ).SetAlign ( caTop ).SetSize( 0, 21 ).SetBorder( 0);
   Result.pLanguagesDirectory.SetUnicode(TRUE);
                  Result.optLanguagesDirectory := NewEditBox( Result.pLanguagesDirectory, [  ] ).SetAlign ( caClient ).SetBorder( 2);
                  Result.optLanguagesDirectory.Tag := 10;
                  Result.bLanguagesDirectoryBrowse := NewButton( Result.pLanguagesDirectory, '...' ).SetAlign ( caRight ).SetSize( 23, 0 ).SetBorder( 0);
   Result.bLanguagesDirectoryBrowse.SetUnicode(TRUE);
                  Result.bLanguagesDirectoryBrowse.Tag := 10;
                Result.optRealLanguagesDirectory := NewEditBox( Result.pLanguagesDirectoryOpt, [ eoReadonly ] ).SetAlign ( caTop ).SetSize( 0, 18 ).SetBorder( 2);
            Result.groupMain := NewGroupBox( Result.scrollOptions, '!Main' ).SetAlign ( caTop ).SetSize( 0, 165 ).SetBorder( 0);
   Result.groupMain.SetUnicode(TRUE);
    Result.groupMain.TabStop := FALSE;
            Result.groupMain.MarginTop := 18;
            Result.groupMain.MarginBottom := 0;
            Result.groupMain.MarginLeft := 8;
            Result.groupMain.MarginRight := 8;
    Result.groupMain.Color := TColor(clBtnFace);
              Result.pPresetsDirectoryOpt := NewPanel( Result.groupMain, esNone ).SetAlign ( caTop ).SetSize( 0, 60 ).SetBorder( 0);
   Result.pPresetsDirectoryOpt.SetUnicode(TRUE);
              Result.pPresetsDirectoryOpt.MarginTop := 2;
              Result.pPresetsDirectoryOpt.MarginBottom := 2;
                Result.lPresetsDirectory := NewLabel( Result.pPresetsDirectoryOpt, '!Categories folder:' ).SetAlign ( caTop ).SetSize( 0, 17 ).SetBorder( 2);
   Result.lPresetsDirectory.SetUnicode(TRUE);
                Result.lPresetsDirectory.Tag := 1;
                Result.optRealPresetsDirectory := NewEditBox( Result.pPresetsDirectoryOpt, [ eoReadonly ] ).SetAlign ( caBottom ).SetSize( 0, 18 ).SetBorder( 2);
                Result.pPresetsDirectory := NewPanel( Result.pPresetsDirectoryOpt, esNone ).SetAlign ( caTop ).SetSize( 0, 21 ).SetBorder( 0);
   Result.pPresetsDirectory.SetUnicode(TRUE);
                  Result.optPresetsDirectory := NewEditBox( Result.pPresetsDirectory, [  ] ).SetAlign ( caClient ).SetBorder( 2);
                  Result.optPresetsDirectory.Tag := 1;
                  Result.bPresetsDirectoryBrowse := NewButton( Result.pPresetsDirectory, '...' ).SetAlign ( caRight ).SetSize( 23, 0 ).SetBorder( 2);
   Result.bPresetsDirectoryBrowse.SetUnicode(TRUE);
                  Result.bPresetsDirectoryBrowse.Tag := 1;
              Result.pFreePresetsDirectoryOpt := NewPanel( Result.groupMain, esNone ).SetAlign ( caTop ).SetSize( 0, 60 ).SetBorder( 0);
   Result.pFreePresetsDirectoryOpt.SetUnicode(TRUE);
              Result.pFreePresetsDirectoryOpt.MarginTop := 2;
              Result.pFreePresetsDirectoryOpt.MarginBottom := 2;
                Result.lFreePresetsDirectory := NewLabel( Result.pFreePresetsDirectoryOpt, '!Free presets folder:' ).SetAlign ( caTop ).SetSize( 0, 17 ).SetBorder( 2);
   Result.lFreePresetsDirectory.SetUnicode(TRUE);
                Result.lFreePresetsDirectory.Tag := 15;
                Result.optRealFreePresetsDirectory := NewEditBox( Result.pFreePresetsDirectoryOpt, [ eoReadonly ] ).SetAlign ( caBottom ).SetSize( 0, 18 ).SetBorder( 2);
                Result.pFreePresetsDirectory := NewPanel( Result.pFreePresetsDirectoryOpt, esNone ).SetAlign ( caTop ).SetSize( 0, 21 ).SetBorder( 0);
   Result.pFreePresetsDirectory.SetUnicode(TRUE);
                  Result.optFreePresetsDirectory := NewEditBox( Result.pFreePresetsDirectory, [  ] ).SetAlign ( caClient ).SetBorder( 2);
                  Result.optFreePresetsDirectory.Tag := 15;
                  Result.bFreePresetsDirectoryBrowse := NewButton( Result.pFreePresetsDirectory, '...' ).SetAlign ( caRight ).SetSize( 23, 0 ).SetBorder( 2);
   Result.bFreePresetsDirectoryBrowse.SetUnicode(TRUE);
                  Result.bFreePresetsDirectoryBrowse.Tag := 15;
              Result.optShowFreePresets := NewCheckBox( Result.groupMain, '!Show free presets' ).SetAlign ( caTop ).AutoSize( TRUE ).SetBorder( 2);
   Result.optShowFreePresets.SetUnicode(TRUE);
              Result.optShowFreePresets.Tag := 16;
    Result.optShowFreePresets.Color := TColor(clBtnFace);
              Result.optShowFreePresets.Checked := TRUE;
            Result.groupGUI := NewGroupBox( Result.scrollOptions, '!GUI' ).SetAlign ( caTop ).SetSize( 0, 80 ).SetBorder( 0);
   Result.groupGUI.SetUnicode(TRUE);
    Result.groupGUI.TabStop := FALSE;
            Result.groupGUI.MarginTop := 18;
            Result.groupGUI.MarginBottom := 0;
            Result.groupGUI.MarginLeft := 8;
            Result.groupGUI.MarginRight := 8;
    Result.groupGUI.Color := TColor(clBtnFace);
              Result.optTopMost := NewCheckBox( Result.groupGUI, '!Stay on top' ).SetAlign ( caTop ).AutoSize( TRUE ).SetBorder( 2);
   Result.optTopMost.SetUnicode(TRUE);
              Result.optTopMost.Tag := 5;
    Result.optTopMost.Color := TColor(clBtnFace);
              Result.optAutoClose := NewCheckBox( Result.groupGUI, '!Close after application of a preset' ).SetAlign ( caTop ).AutoSize( TRUE ).SetBorder( 2);
   Result.optAutoClose.SetUnicode(TRUE);
              Result.optAutoClose.Tag := 6;
    Result.optAutoClose.Color := TColor(clBtnFace);
              Result.optShowProgress := NewCheckBox( Result.groupGUI, '!Don''t close progress window' ).SetAlign ( caTop ).AutoSize( TRUE ).SetBorder( 2);
   Result.optShowProgress.SetUnicode(TRUE);
              Result.optShowProgress.Tag := 11;
    Result.optShowProgress.Color := TColor(clBtnFace);
              Result.optShowProgress.Checked := TRUE;
            Result.groupEditor := NewGroupBox( Result.scrollOptions, '!Editor' ).SetAlign ( caTop ).SetSize( 0, 84 ).SetBorder( 0);
   Result.groupEditor.SetUnicode(TRUE);
    Result.groupEditor.TabStop := FALSE;
            Result.groupEditor.MarginTop := 18;
            Result.groupEditor.MarginBottom := 0;
            Result.groupEditor.MarginLeft := 8;
            Result.groupEditor.MarginRight := 8;
              Result.pExternalEditorOpt := NewPanel( Result.groupEditor, esNone ).SetAlign ( caTop ).SetSize( 0, 60 ).SetBorder( 0);
   Result.pExternalEditorOpt.SetUnicode(TRUE);
              Result.pExternalEditorOpt.MarginTop := 2;
              Result.pExternalEditorOpt.MarginBottom := 2;
                Result.lExternalEditor := NewLabel( Result.pExternalEditorOpt, '!External editor:' ).SetAlign ( caTop ).SetSize( 0, 17 ).SetBorder( 2);
   Result.lExternalEditor.SetUnicode(TRUE);
                Result.lExternalEditor.Tag := 12;
                Result.pExternalEditor := NewPanel( Result.pExternalEditorOpt, esNone ).SetAlign ( caTop ).SetSize( 0, 21 ).SetBorder( 0);
   Result.pExternalEditor.SetUnicode(TRUE);
                  Result.optExternalEditor := NewEditBox( Result.pExternalEditor, [  ] ).SetAlign ( caClient ).SetBorder( 2);
                  Result.optExternalEditor.Tag := 12;
                  Result.bExternalEditorBrowse := NewButton( Result.pExternalEditor, '...' ).SetAlign ( caRight ).SetSize( 23, 0 ).SetBorder( 2);
   Result.bExternalEditorBrowse.SetUnicode(TRUE);
                  Result.bExternalEditorBrowse.Tag := 12;
                Result.optRealExternalEditor := NewEditBox( Result.pExternalEditorOpt, [ eoReadonly ] ).SetAlign ( caTop ).SetSize( 0, 18 ).SetBorder( 2);
            Result.groupProcesses := NewGroupBox( Result.scrollOptions, '!Processes' ).SetAlign ( caTop ).SetSize( 0, 80 ).SetBorder( 0);
   Result.groupProcesses.SetUnicode(TRUE);
    Result.groupProcesses.TabStop := FALSE;
            Result.groupProcesses.MarginTop := 18;
            Result.groupProcesses.MarginLeft := 8;
            Result.groupProcesses.MarginRight := 8;
    Result.groupProcesses.Color := TColor(clBtnFace);
              Result.lCloseProcessWait := NewLabel( Result.groupProcesses, '!Wait until process quits correctly:' ).SetAlign ( caTop ).SetSize( 0, 17 ).SetBorder( 2);
   Result.lCloseProcessWait.SetUnicode(TRUE);
              Result.lCloseProcessWait.Tag := 13;
              Result.pCloseProcessWait := NewPanel( Result.groupProcesses, esNone ).SetAlign ( caTop ).SetSize( 0, 21 ).SetBorder( 1);
   Result.pCloseProcessWait.SetUnicode(TRUE);
                Result.optCloseProcessWait := NewEditBox( Result.pCloseProcessWait, [ eoNumber ] ).SetAlign ( caLeft ).SetSize( 45, 0 ).SetBorder( 2);
                Result.optCloseProcessWait.Tag := 13;
    Result.optCloseProcessWait.TextAlign := KOL.taCenter;
                Result.optCloseProcessWait.Text := '3000';
                Result.lCloseProcessWaitComment := NewLabel( Result.pCloseProcessWait, '!ms.' ).SetPosition( 50, 2 ).SetSize( 65, 17 ).SetBorder( 2);
   Result.lCloseProcessWaitComment.SetUnicode(TRUE);
                Result.lCloseProcessWaitComment.Tag := 13;
    Result.lCloseProcessWaitComment.VerticalAlign := KOL.vaCenter;
              Result.optTerminateAfterWait := NewCheckBox( Result.groupProcesses, '!Then terminate process' ).SetAlign ( caTop ).SetSize( 0, 17 ).SetBorder( 2);
   Result.optTerminateAfterWait.SetUnicode(TRUE);
              Result.optTerminateAfterWait.Tag := 14;
            Result.groupDialogs := NewGroupBox( Result.scrollOptions, '!Dialogs' ).SetAlign ( caTop ).SetSize( 0, 44 ).SetBorder( 0);
   Result.groupDialogs.SetUnicode(TRUE);
    Result.groupDialogs.TabStop := FALSE;
            Result.groupDialogs.MarginTop := 18;
            Result.groupDialogs.MarginLeft := 8;
            Result.groupDialogs.MarginRight := 8;
            Result.groupDialogs.Visible := False;
    Result.groupDialogs.Color := TColor(clBtnFace);
              Result.optPreferSystemDialogs := NewCheckBox( Result.groupDialogs, '!Use the system dialog boxes if possible' ).SetAlign ( caTop ).SetSize( 0, 17 ).SetBorder( 2);
   Result.optPreferSystemDialogs.SetUnicode(TRUE);
              Result.optPreferSystemDialogs.Tag := 14;
              Result.optPreferSystemDialogs.Enabled := False;
              Result.optPreferSystemDialogs.Checked := TRUE;
            Result.groupIniFiles := NewGroupBox( Result.scrollOptions, '!INI Files' ).SetAlign ( caTop ).SetSize( 0, 44 ).SetBorder( 0);
   Result.groupIniFiles.SetUnicode(TRUE);
    Result.groupIniFiles.TabStop := FALSE;
            Result.groupIniFiles.MarginTop := 18;
            Result.groupIniFiles.MarginLeft := 8;
            Result.groupIniFiles.MarginRight := 8;
            Result.groupIniFiles.Visible := False;
    Result.groupIniFiles.Color := TColor(clBtnFace);
    Result.pagesMain.Pages[ 2 ].Color := TColor(clBtnFace);
        Result.pAbout := NewPanel( Result.pagesMain.Pages[ 2 ], esLowered ).SetAlign ( caClient );
   Result.pAbout.SetUnicode(TRUE);
          Result.reAbout := NewRichEdit( Result.pAbout, [ eoMultiline, eoNoHScroll, eoReadonly ] ).SetAlign ( caClient );
   Result.reAbout.SetUnicode(TRUE);
          Result.reAbout.HasBorder := FALSE;
          Result.reAbout.RE_AutoURLDetect := TRUE;
    Result.splitterMain := NewSplitterEx( Result.Form, 260, 326, esNone ).SetAlign ( caLeft ).SetBorder( 2);
   Result.splitterMain.SetUnicode(TRUE);
    Result.splitterMain.Color := TColor(clBtnFace);
      Result.lExternalEditor.OnMouseEnter := Result.HintsMouseEnter;
      Result.lFreePresetsDirectory.OnMouseEnter := Result.HintsMouseEnter;
      Result.lCloseProcessWait.OnMouseEnter := Result.HintsMouseEnter;
      Result.lPresetsDirectory.OnMouseEnter := Result.HintsMouseEnter;
      Result.bApply.OnClick := Result.bApplyClick;
      Result.bApply.OnMouseEnter := Result.HintsMouseEnter;
    Result.bApply.DefaultBtn := TRUE;
      Result.canvasInfoPreview.OnPaint := Result.canvasInfoPreviewPaint;
    Result.optCloseProcessWait.Color := TColor(clWindow);
      Result.optCloseProcessWait.OnMouseEnter := Result.HintsMouseEnter;
      Result.optCloseProcessWait.OnLeave := Result.optCloseProcessWaitLeave;
      Result.optCloseProcessWait.OnChange := Result.optCloseProcessWaitChange;
    Result.optExternalEditor.Color := TColor(clWindow);
      Result.optExternalEditor.OnMouseEnter := Result.HintsMouseEnter;
      Result.optExternalEditor.OnChange := Result.optExternalEditorChange;
    Result.optFreePresetsDirectory.Color := TColor(clWindow);
      Result.optFreePresetsDirectory.OnMouseEnter := Result.HintsMouseEnter;
      Result.optFreePresetsDirectory.OnChange := Result.optFreePresetsDirectoryChange;
      Result.optLanguage.OnMouseEnter := Result.HintsMouseEnter;
      Result.optLanguage.OnChange := Result.optLanguageChange;
    Result.optLanguageAuthor.Color := TColor(clBtnFace);
      Result.optLanguageAuthor.OnMouseEnter := Result.HintsMouseEnter;
      Result.optLanguageAuthor.OnKeyChar := Result.DenyKeyChar;
    Result.optLanguageName.Color := TColor(clBtnFace);
      Result.optLanguageName.OnMouseEnter := Result.HintsMouseEnter;
      Result.optLanguageName.OnKeyChar := Result.DenyKeyChar;
    Result.optLanguagesDirectory.Color := TColor(clWindow);
      Result.optLanguagesDirectory.OnMouseEnter := Result.HintsMouseEnter;
      Result.optLanguagesDirectory.OnChange := Result.optLanguagesDirectoryChange;
    Result.optPresetsDirectory.Color := TColor(clWindow);
      Result.optPresetsDirectory.OnMouseEnter := Result.HintsMouseEnter;
      Result.optPresetsDirectory.OnChange := Result.optPresetsDirectoryChange;
      Result.optTopMost.OnClick := Result.optTopMostClick;
      Result.optTopMost.OnMouseEnter := Result.HintsMouseEnter;
    Result.optRealExternalEditor.Color := TColor(clBtnFace);
      Result.optRealExternalEditor.OnMouseEnter := Result.HintsMouseEnter;
      Result.optRealExternalEditor.OnKeyChar := Result.DenyKeyChar;
    Result.optRealFreePresetsDirectory.Color := TColor(clBtnFace);
      Result.optRealFreePresetsDirectory.OnMouseEnter := Result.HintsMouseEnter;
      Result.optRealFreePresetsDirectory.OnKeyChar := Result.DenyKeyChar;
    Result.optRealPresetsDirectory.Color := TColor(clBtnFace);
      Result.optRealPresetsDirectory.OnMouseEnter := Result.HintsMouseEnter;
      Result.optRealPresetsDirectory.OnKeyChar := Result.DenyKeyChar;
      Result.pagesEdit.OnMouseEnter := Result.HintsMouseEnter;
      Result.reAbout.OnRE_URLClick := Result.reAboutRE_URLClick;
      Result.scrollOptions.OnMouseEnter := Result.HintsMouseEnter;
    Result.tvPresets.SetAutoPopupMenu( Result.pmPresets );
      Result.tvPresets.OnMouseDblClk := Result.tvPresetsMouseDblClk;
      Result.tvPresets.OnMouseUp := Result.tvPresetsMouseUp;
      Result.tvPresets.OnMouseEnter := Result.HintsMouseEnter;
      Result.tvPresets.OnSelChange := Result.tvPresetsSelChange;
      Result.pagesMain.OnMouseEnter := Result.HintsMouseEnter;
      Result.pagesMain.OnSelChange := Result.pagesMainSelChange;
      Result.pagesMain.CurIndex := 1;
      Result.pagesMain.Pages[ 1 ].BringToFront;
    Result.optLanguageModified.Color := TColor(clBtnFace);
      Result.optLanguageModified.OnMouseEnter := Result.HintsMouseEnter;
      Result.optLanguageModified.OnKeyChar := Result.DenyKeyChar;
      Result.bReread.OnClick := Result.bRereadClick;
      Result.bReread.OnMouseEnter := Result.HintsMouseEnter;
    Result.bReread.Anchor(FALSE, FALSE, TRUE, FALSE);
    Result.optLanguageLCID.Color := TColor(clBtnFace);
      Result.optLanguageLCID.OnMouseEnter := Result.HintsMouseEnter;
      Result.optLanguageLCID.OnKeyChar := Result.DenyKeyChar;
      Result.bExternalEditorBrowse.OnClick := Result.bExternalEditorBrowseClick;
      Result.bExternalEditorBrowse.OnMouseEnter := Result.HintsMouseEnter;
      Result.bFreePresetsDirectoryBrowse.OnClick := Result.bFreePresetsDirectoryBrowseClick;
      Result.bFreePresetsDirectoryBrowse.OnMouseEnter := Result.HintsMouseEnter;
      Result.bLanguagesDirectoryBrowse.OnClick := Result.bLanguagesDirectoryBrowseClick;
      Result.bLanguagesDirectoryBrowse.OnMouseEnter := Result.HintsMouseEnter;
      Result.bPresetsDirectoryBrowse.OnClick := Result.bPresetsDirectoryBrowseClick;
      Result.bPresetsDirectoryBrowse.OnMouseEnter := Result.HintsMouseEnter;
      Result.lCloseProcessWaitComment.OnMouseEnter := Result.HintsMouseEnter;
      Result.optAutoClose.OnClick := Result.optAutoCloseClick;
      Result.optAutoClose.OnMouseEnter := Result.HintsMouseEnter;
      Result.dlgFile.WndOwner := Result.Form.GetWindowHandle;
      Result.dlgDirectory.WndOwner := Result.Form.GetWindowHandle;
      Result.optShowProgress.OnClick := Result.optShowProgressClick;
      Result.optShowProgress.OnMouseEnter := Result.HintsMouseEnter;
      Result.optShowFreePresets.OnClick := Result.optShowFreePresetsClick;
      Result.optShowFreePresets.OnMouseEnter := Result.HintsMouseEnter;
      Result.optPreferSystemDialogs.OnClick := Result.optTerminateAfterWaitClick;
      Result.optPreferSystemDialogs.OnMouseEnter := Result.HintsMouseEnter;
      Result.optTerminateAfterWait.OnClick := Result.optTerminateAfterWaitClick;
      Result.optTerminateAfterWait.OnMouseEnter := Result.HintsMouseEnter;
      Result.lLanguagesDirectory.OnMouseEnter := Result.HintsMouseEnter;
    Result.optRealLanguagesDirectory.Color := TColor(clBtnFace);
      Result.optRealLanguagesDirectory.OnMouseEnter := Result.HintsMouseEnter;
      Result.optRealLanguagesDirectory.OnKeyChar := Result.DenyKeyChar;
    Result.Form.CenterOnParent;
    Result.klfrmMainFormCreate( Result );

end;

